﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="top.aspx.cs" Inherits="LTJ.WebPage.UserManage.framepage.top" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title></title>
    <link href="../css/comm.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/jquery.js"></script>
    <script type="text/javascript" src="../js/common.js"></script>
</head>
<body>
<div class="top">
	<p class="tlt"><a target="_top" href="<%=config.Weburl%>"><img alt="运价中国网" src="../images/yjzg.gif" /></a></p>
    <div class="qy1">
		<p class="qyt"><%=companyinfo.cname%></p>
		<ul>
            <%foreach(LTJ.Entity.Authority ainfo in authlist){%>
            <li onclick="top.location.href = '../index.aspx?changecid=<%=ainfo.Cid%>'"><%=ainfo.Cname%></li>
            <%}%>
		</ul>
	</div>
	<p class="trt">欢迎您， <span class="f_f96900"><%=username%></span> <a title="" class="l_f96900" href="../layout.aspx">退出</a> | <a title="" class="l_f96900" href="#" onclick="loadurl('<%=toptable.Rows[0]["mainmenulist"]%>', '<%=toptable.Rows[0]["id"]%>', '<%=toptable.Rows[0]["mainmenulist"]%>', '../system/changepass.aspx')">修改密码</a></p>
</div>
<div class="hd">
	<strong class="logo">
        <%if (companyinfo != null && companyinfo.logo.ToString() != "")
          { %>
        <img src="<%=config.Weburl%><%=companyinfo.logo %>" onload="try{img_loaded(this,80,80);}catch(e){alert(e.message);}"/>
        <%}
          else
          { %>
          <img src="../images/logo.gif" />
        <%} %></strong>
	<ul class="nav">
        <%foreach(System.Data.DataRow dr in toptable.Rows){%>
        <li id="top_<%=dr["id"]%>" class="<%if(dr["id"].ToString()=="1"){%>li2<%}else{%>li1<%}%>"><a title="<%=dr["title"]%>" href="#" onclick="loadurl('<%=dr["mainmenulist"]%>','<%=dr["id"]%>','<%=dr["mainmenulist"]%>','<%=dr["defaulturl"]%>');"><%=dr["title"]%></a></li>
        <%}%>
	</ul>
</div>
</body>
<script type="text/javascript">
    jQuery(document).ready(function () {
        jQuery(".qy1").click(function () {
            var qy = jQuery(this);
            if (qy.attr("class") == "qy1") {
                qy.removeClass().addClass("qy2");
            } else {
                qy.removeClass().addClass("qy1");
            }
        });
    });
    function loadurl(showmenuid, toptabmenuid, mainmenulist, defaulturl) {
        jQuery(".nav").find("li").removeClass("li2");
        jQuery(".nav").find("li").addClass("li1");
        document.getElementById("top_" + toptabmenuid).className = "li2";
        top.mainFrame.location.href = '../framepage/managerbody.aspx?showmenuid=' + showmenuid + '&toptabmenuid=' + toptabmenuid + '&mainmenulist=' + mainmenulist + '&defaulturl=' + defaulturl;
    }

    loadurl('<%=toptable.Rows[0]["mainmenulist"]%>', '<%=toptable.Rows[0]["id"]%>', '<%=toptable.Rows[0]["mainmenulist"]%>', '<%=toptable.Rows[0]["defaulturl"]%>');
</script>
</html>
